<html>
<head><meta charset="utf-8"><title>Rename &quot;Struct Expression&quot; · t-lang/doc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/index.html">t-lang/doc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/topic/Rename.20.22Struct.20Expression.22.html">Rename &quot;Struct Expression&quot;</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="226290019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/237824-t-lang/doc/topic/Rename%20%22Struct%20Expression%22/near/226290019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> isHavvy <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/topic/Rename.20.22Struct.20Expression.22.html#226290019">(Feb 14 2021 at 07:08)</a>:</h4>
<p>So, "Struct Expression" currently designates the expression for creating both structs and unions, and soon also enums. I feel like calling it a "struct expression" is a bad fit and it should be renamed. Some bikeshedding names:</p>
<ul>
<li>Named Constructor Expression</li>
<li>Named Value Expression</li>
<li>User Defined Type Literal Expression</li>
<li>Named Literal Expression</li>
</ul>



<a name="226290517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/237824-t-lang/doc/topic/Rename%20%22Struct%20Expression%22/near/226290517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/topic/Rename.20.22Struct.20Expression.22.html#226290517">(Feb 14 2021 at 07:25)</a>:</h4>
<p>"aggregate expression"?</p>



<a name="226290522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/237824-t-lang/doc/topic/Rename%20%22Struct%20Expression%22/near/226290522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/topic/Rename.20.22Struct.20Expression.22.html#226290522">(Feb 14 2021 at 07:25)</a>:</h4>
<p>"aggregate literal"?</p>



<a name="226290701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/237824-t-lang/doc/topic/Rename%20%22Struct%20Expression%22/near/226290701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> isHavvy <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/topic/Rename.20.22Struct.20Expression.22.html#226290701">(Feb 14 2021 at 07:31)</a>:</h4>
<p>Aggregate makes me think of arrays (and, tuples,)</p>



<a name="226325572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/237824-t-lang/doc/topic/Rename%20%22Struct%20Expression%22/near/226325572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/topic/Rename.20.22Struct.20Expression.22.html#226325572">(Feb 14 2021 at 21:25)</a>:</h4>
<p>I think that's reasonable. Are you looking to describe all of those, or just struct/union/enum but not array or tuple?</p>



<a name="226326570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/237824-t-lang/doc/topic/Rename%20%22Struct%20Expression%22/near/226326570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> isHavvy <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/topic/Rename.20.22Struct.20Expression.22.html#226326570">(Feb 14 2021 at 21:48)</a>:</h4>
<p>Just those three. The syntax for <code>Name { ... }</code>, <code>Name</code>, and we give a mention to <code>Name( ... )</code>.</p>



<a name="226326577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/237824-t-lang/doc/topic/Rename%20%22Struct%20Expression%22/near/226326577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> isHavvy <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/topic/Rename.20.22Struct.20Expression.22.html#226326577">(Feb 14 2021 at 21:49)</a>:</h4>
<p>Tuples and arrays each have their own expressions currently.</p>



<a name="226333196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/237824-t-lang/doc/topic/Rename%20%22Struct%20Expression%22/near/226333196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/topic/Rename.20.22Struct.20Expression.22.html#226333196">(Feb 14 2021 at 23:59)</a>:</h4>
<p>Meh, this is an established terminology that is already used everywhere (?).<br>
It's hard to come up with a better short name for "expressions for braced structs, braced variants, unions and sometimes even non-braced structs and variants" than the name that was adopted naturally.</p>



<a name="226336750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/237824-t-lang/doc/topic/Rename%20%22Struct%20Expression%22/near/226336750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/topic/Rename.20.22Struct.20Expression.22.html#226336750">(Feb 15 2021 at 01:24)</a>:</h4>
<p>ADT expressions? But I'm in agreement with Vadim here.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>